package suggestionBox.dao;
import java.util.List;

import org.hibernate.Query;

import suggestionBox.bean.SuggestionBox;
import util.dao.HibernateDaoImpl;

public class SuggestionDaoImpl extends HibernateDaoImpl<SuggestionBox, Long>
		implements SuggestionDao {

	@SuppressWarnings("unchecked")
	@Override
	public List<SuggestionBox> findAllByOrder() {
		Query query = this.getSession().createQuery("from "+SuggestionBox.class.getName()+" s order by s.sugg_id desc");
		return query.list();
	}

}
